Skip to content

test: add regression test for issue #2001 (progress related_request_id)#2747

Open
kaushik701 wants to merge 4 commits into
modelcontextprotocol:mainfrom
kaushik701:test/fix-2001-progress-related-request-id
Open

test: add regression test for issue #2001 (progress related_request_id)#2747
kaushik701 wants to merge 4 commits into
modelcontextprotocol:mainfrom
kaushik701:test/fix-2001-progress-related-request-id

Conversation

@kaushik701
Copy link
Copy Markdown

Adds a dedicated regression test file for issue #2001.

Context.report_progress() was silently dropping progress notifications in stateless HTTP / SSE transports because send_progress_notification() was called without related_request_id. The fix (already in main via mcpserver/context.py) passes related_request_id=self.request_id, consistent with send_log_message().

This test file covers:

  • The primary regression: related_request_id is forwarded on every call
  • Edge case: no progress_token -> notification is skipped (no-op)
  • Edge case: integer progress_token (e.g. 0) works correctly

Closes #2001

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

…ss related_request_id)

Adds a dedicated regression test file for issue modelcontextprotocol#2001.

Context.report_progress() was silently dropping progress notifications
in stateless HTTP / SSE transports because send_progress_notification()
was called without related_request_id. The fix (already in main via
mcpserver/context.py) passes related_request_id=self.request_id,
consistent with send_log_message().

This test file covers:
- The primary regression: related_request_id is forwarded on every call
- Edge case: no progress_token -> notification is skipped (no-op)
- Edge case: integer progress_token (e.g. 0) works correctly

Closes modelcontextprotocol#2001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Progress notifications not delivered via SSE in stateless HTTP mode

1 participant